package com.example.figurehecheng.controller.merchant;


import com.example.figurehecheng.common.result.Result;
import com.example.figurehecheng.common.utils.AliOssUtil;
import com.example.figurehecheng.domain.dto.TourtableDTO;
import com.example.figurehecheng.domain.dto.couponDTO;
import com.example.figurehecheng.domain.vo.ImageVO;
import com.example.figurehecheng.domain.vo.TourtableVO;
import com.example.figurehecheng.service.ITourtableService;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;
import java.util.UUID;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 宇科工作室
 * @since 2024-10-18
 */
@RestController("merchantTourtableController")
@RequestMapping("/merchant/tourtable")
@CrossOrigin
@Slf4j
@RequiredArgsConstructor
public class TourtableController {
private final ITourtableService iTourtableService;
private final AliOssUtil aliOssUtil;


/**
 * 修改项目
 */

@PostMapping("/unpdate")
@ApiOperation("修改")
public void updateCoupon(@RequestBody TourtableDTO tourtableDTO) {

    iTourtableService.updatetour(tourtableDTO);

}



/**
 * 查询
 */
@GetMapping("/selectone")
@ApiOperation(value = "查询项目")
public Result<TourtableVO> querySearch(){
    TourtableVO selectone = iTourtableService.selectone();

    return Result.success(selectone);
}


    /**
     * 发布项目
     * @param
     */
    @PostMapping("/savetable")
      public void addCoupon(@RequestBody TourtableDTO tourtableDTO) {
    iTourtableService.saveTour(tourtableDTO);
}











}
